package com.homson.coreservice.serviceinfrastructure.datasource.model.account;

import com.baomidou.mybatisplus.annotation.TableName;
import com.homson.coreservice.servicecommon.utils.IDWorkerUtils;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author: homson_leo
 * @contact: hey_超级巨星（Homson_Leo）- 刘泓岑 1196816884@qq.com
 * @time: 2025/10/2 09:21 AM
 **/
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("transaction")
public class TransactionDO extends BaseAccount{
    
    private Long transactionId;
    private BigDecimal amount; // 金额（正数=收入，负数=支出）
    private String type; // 交易类型（INCOME/EXPENSE/TRANSFER）
    private String description; // 交易内容
    private LocalDateTime transDate;
    
    public void createTransactionId() {
        this.transactionId = IDWorkerUtils.generateSnowId();
    }
    
  
}
